<?php
namespace TennisTournament\Helpers;

use TennisTournament\Helpers\ModelFactoriesHelper as MFH;

final class ScenarioFactoriesHelper {

    private function __construct(){}

    public static function getAllGroupsSorted() {

        $player1 = MFH::createPlayer(1, "Misho", "Java Developer", "/img/player.jpg", 4, 1, 20, 30);
        $player2 = MFH::createPlayer(2, "Sasho", "Java Developer", "/img/player.jpg", 1, 1, 10, 2);
        $player3 = MFH::createPlayer(3, "Ivan", "Java Developer", "/img/player.jpg", 0, 4, 19, 2);
        $player4 = MFH::createPlayer(4, "Niki", "Java Developer", "/img/Proxiad.png", 2, 2, 19, 29);
        $player5 = MFH::createPlayer(5, "Danail", "Java Developer", "/img/player.jpg", 2, 3, 13, 15);
        $player6 = MFH::createPlayer(6, "Mimi", "Java Developer", "/img/Proxiad.png", 3, 1, 19, 9);
        $player7 = MFH::createPlayer(7, "Beti", "Team Leader", "/img/player.jpg", 1, 2, 2, 90);
        $player8 = MFH::createPlayer(8, "Grigor", "Manager", "/img/Proxiad.png", 2, 1, 3, 13);
        $player9 = MFH::createPlayer(9, "Ivanov", "Trainer", "/img/player.jpg", 1, 1, 34, 2);
        $player10 = MFH::createPlayer(10, "Zara", "Project Manager", "/img/player.jpg", 1, 1, 12, 2);

        $groupStatsA1 = MFH::createGroupStats(1, $player1, 100, 50, 4, 1, 4);
        $groupStatsA2 = MFH::createGroupStats(2, $player2, 30, 20, 1, 1, 1);
        $groupStatsA3 = MFH::createGroupStats(3, $player3, 10, 90, 0, 4, 0);
        $groupStatsA4 = MFH::createGroupStats(4, $player4, 10, 43, 2, 2, 2);
        $groupStatsA5 = MFH::createGroupStats(5, $player5, 55, 55, 2, 3, 2);

        $groupStatsB1 = MFH::createGroupStats(6, $player6, 73, 30, 3, 1, 3);
        $groupStatsB2 = MFH::createGroupStats(7, $player7, 30, 60, 1, 2, 1);
        $groupStatsB3 = MFH::createGroupStats(8, $player8, 37, 20, 2, 1, 2);
        $groupStatsB4 = MFH::createGroupStats(9, $player9, 50, 50, 1, 1, 1);
        $groupStatsB5 = MFH::createGroupStats(10, $player10, 20, 24, 1, 1, 1);

        $groupA = MFH::craeteGroup("A", array(
            $groupStatsA1, $groupStatsA5, $groupStatsA4, $groupStatsA2, $groupStatsA3)
        );

        $groupB = MFH::craeteGroup("B", array(
                $groupStatsB1, $groupStatsB3, $groupStatsB4, $groupStatsB5, $groupStatsB2)
        );

        return array($groupA, $groupB);
    }
}